OData Reports
Introduction
We’re pleased to announce that in Enersight 2.16.1, we now have the capability to generate OData tables based on the definition of a Report Favorite (aka Report Setting). This new capability means that it is much easier to get data out of the application in a format determined by you, the user, without your IT organization having to join or aggregate data or having to recreate your custom reporting variables not available from the OData service. Both user and company favorites are supported, with all report settings respected in the OData output.
Defining a Report Favorite
Report Favorites are defined in the Reports tab of the Enersight application. Report Favorites capture the selected report, report settings such as As Produced/As Sold, Interest Type, etc., groups/filters, and report periodicity settings.
Report Groups and Filters
Report groups are supported but the data generated is the grouped values at the scenario object, facilities, as well as all asset detail – grouped values for all assets in the asset hierarchy. This can result in a lot of data being pulled via OData. To pull a subset of this data and reduce loading time, you can add ?$filter to your OData query (filtered to a particular ReportAsset to get grouped values for a specific facility, for example) as described below in the ‘Filtering to a Specific Asset’ section.
Report Filters are supported (e.g., you can filter down to Wells by using a Filter with the Asset Type = Well), and the selected Unit System is respected when retrieving report data via OData.
OData Tables and Expected Behavior
For each defined Report Favorite, there are two OData tables available: one for the array (time series) data and one for the scalar data (if any) defined in the ‘header’ section of the report. These tables are created/updated when a Report Favorite is saved. Company and user favorites will be visible, but you will only see your user created favorites, not those created by other users.
The tables follow a naming pattern as follows: ReportDataArray _favorite_name for array data and ReportDataScalar_favorite_name for scalar data.
Prior to Enersight 2.17.1, OData Reports connections would return the report data for every asset in the PDS. To limit the return of what can be an enormous amount of data, as of 2.17.1 the default behavior is that the results returned are only for the 'Scenario' asset of the PDS, the equivalent of data at the PDS Version level. To get data for a different (or multiple) reporting levels, you can modify your OData query using the $filter=ReportAsset eq parameter. See the Filtering to Specific Assets section below for examples.
Constructing an OData Query
Query strings for OData reports look largely the same as those for our existing OData tables. Copy out the OData connection string from the Manage PDS screen and append /ReportDataArray_favorite_name (where favorite_name is the name of your saved Report Favorite, replacing spaces with underscores) to access a particular time series Report Favorite or /ReportDataScalar_favorite_name for scalar data.
If you browse to the OData link copied from the Manage PDS screen, you’ll see all of the available report tables list along with the previously existing OData tables.
e.g., https://odata4.enersight.net/Versioncc699879-d621-4a77-b6e3-b2e9ab112f23/ReportDataArray_Econ_Summary_Net_10_years
Filtering to Specific Assets
Data for the Scenario level assets is returned by default as of 2.17.1. Prior to this, data was returned for every asset, which could result in a very large amount of data, resulting in timeouts.
To filter to one specific report asset/node, you would add ?$filter=ReportAsset eq 'Reporting Node' to the end of your query, where Reporting Node is the name of the Enersight facility/well/scenario for which you want to generate the report.
e.g., https://odata4.enersight.net/Versioncc699879-d621-4a77-b6e3-b2e9ab112f23/ReportDataArray_MyFavorite?$filter=ReportAsset eq 'Reporting_Total_East'
For example, if you have saved data from 2 projects into the same PDS and want to return report data for the top level nodes for each project, and the projects are named Reporting_Total_West and Reporting_Total_East. The query to get data for both nodes would be as follows:
https://odata4.enersight.net/Versioncc699879-d621-4a77-b6e3-b2e9ab112f23/ReportDataArray_MyFavorite?$filter=ReportAsset in ('Reporting_Total_West', 'Reporting_Total_East')
where MyFavorite in ReportDataArray_MyFavorite is the Report Favorite that you created in the Reports tab and the VersionID is replaced with your specific PDS Version ID.
Unsupported Features
The following features are currently unsupported when using OData Reports: Group by Flow Path, Incremental Result Type, Report label meta tags. Note that Project Level Report Groups are only available for the project in which they were created. Company level Report Groups are recommended.
Reports that do not have a date column (such as a Drilling summary or Asset One-line summary) are not generated for OData Reports.